﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Administrator/EHTAdmin.Master" AutoEventWireup="true" CodeBehind="EHTUser.aspx.cs" Inherits="EHTWebsiteProject.Administrator.EHTUser" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MenuModulContent" runat="server">
     <div class="MenuSub-Left" >
        <table>
            <tr>
                <td> <img alt="" src="../images/EHTgiaodien/icon-48-user.png" /></td>
                <td><asp:Label ID="lbUserManager" runat="server" Text="Quản lý thành viên" ></asp:Label></td>
            </tr>
        </table>           
    </div>
    <div class="MenuSub-Right" align="right">
        <table style="height:60px">
            <tr>                
                <td valign="middle">
                    <div class="add-edit-del">
                            <asp:ImageButton ID="ImgUnLock" runat="server" 
                                ImageUrl="~/images/EHTgiaodien/icon-32-unlock.jpeg" width="32px" height="32px" 
                                CssClass="imagboder" onclick="ImgUnLock_Click" />                                               
                            <br />
                            <asp:Label ID="lbUnLock" runat="server" Text="Mở khóa"></asp:Label>                        
                    </div>
                </td>
                <td valign="middle">
                    <div class="add-edit-del">  
                            <asp:ImageButton ID="ImgLock" ImageUrl="~/images/EHTgiaodien/icon-32-Lock.jpeg" 
                                runat="server" width="32px" height="32px" CssClass="imagboder" 
                                onclick="ImgLock_Click" />                     
                            <br />
                            <asp:Label ID="lbLock" runat="server" Text="Khóa"></asp:Label>                        
                    </div>
                </td>
              <td valign="middle">
                    <div class="add-edit-del">
                         <asp:ImageButton ID="ImgDel" ImageUrl="~/images/EHTgiaodien/icon-32-delete.png" 
                                runat="server" width="32px" height="32px" CssClass="imagboder" 
                                OnClientClick="return confirm('Are you sure you want to delete?');" 
                             onclick="ImgDel_Click" />                                                     
                            <br />
                            <asp:Label ID="lbDel" runat="server" Text="Xóa"></asp:Label>       
                    </div>
                </td>

                <td valign="middle">
                    <div class="add-edit-del">
                         <asp:ImageButton ID="ImgEdit" ImageUrl="~/images/EHTgiaodien/icon-32-edit.png" 
                                runat="server" width="32px" height="32px" CssClass="imagboder" onclick="ImgEdit_Click" 
                                />  <br />                                                                      
                            <asp:Label ID="lbEdit" runat="server" Text="Sửa"></asp:Label> 
                    </div>
                </td>
                <td valign="middle">
                    <div class="add-edit-del">
                        <a href="EHTUserUI.aspx?Type=Add">
                            <img alt="" src="../images/EHTgiaodien/icon-32-new.png" width="32px" height="32px" class="imagboder" /><br />
                            <asp:Label ID="lbAddNew" runat="server" Text="Thêm mới"></asp:Label>
                        </a>
                    </div>
                </td>
                 <td valign="middle">
                    <div class="add-edit-del">
                        <a href="#">
                            <img alt="" src="../images/EHTgiaodien/icon-32-help.png" width="32px" height="32px" class="imagboder" /><br />
                            <asp:Label ID="lbHelp" runat="server" Text="Trợ giúp"></asp:Label>
                        </a>
                    </div>
                </td>                
            </tr>
        </table>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentMain" runat="server">
     <asp:Literal ID="ltrErorr" runat="server"></asp:Literal>
    <div style="padding-top:10px;">
        <asp:Panel ID="pnUser" runat="server">
            <asp:Repeater ID="rpUser" runat="server" onitemcommand="rpUser_ItemCommand" 
            onitemdatabound="rpUser_ItemDataBound" >                      
        <HeaderTemplate>
            <table ID="table" border="0" cellpadding="0" cellspacing="0" >
                 <thead>
                    <tr>
                                    <th>
                                        <asp:CheckBox ID="ckAll" runat="server" AutoPostBack="true" OnCheckedChanged="CheckAll" />    
                                        </th>                    
                                    
                                    <th>
                                        <asp:Label ID="lbID" runat="server" Text="STT"></asp:Label>
                                    </th>
                                    <th>
                                        <asp:Label ID="lbAccount" runat="server" Text=" Tài khoản"></asp:Label>                            
                                    </th>
                                    <th>
                                        <asp:Label ID="lbEmail" runat="server" Text=" Email "></asp:Label>                             
                                    </th>
                                    <th>
                                        <asp:Label ID="lbRole" runat="server" Text=" Role "></asp:Label>                             
                                    </th> 
                                    <th>
                                        <asp:Label ID="lbMenuCon" runat="server" Text=" Tạo menu cho tài khoản "></asp:Label>                             
                                    </th>   
                                    <th>
                                         <asp:Label ID="lbStatus" runat="server" Text=" Trạng thái "></asp:Label>   
                                    </th>                                                                                                                                             
                    </tr>
                 </thead>
                 <tbody>            
        </HeaderTemplate>
        <ItemTemplate>
                 <tr>
                        <td>
                            <asp:CheckBox ID="ckMenu"  runat="server" />
                            <asp:Label ID="lbDelID" runat="server" Visible="false" Text='<%#Eval("UserName")%>'></asp:Label>
                        </td>
                        <td>
                             <%# Container.ItemIndex + 1 %>
                        </td>
                        <td>
                           <a href='EHTUserUI.aspx?User=<%#Eval("UserName")%>&&Type=Edit' class="linkedit">
                             <%#Eval("UserName")%>
                           </a>
                        </td>
                        <td>
                            <%#Eval("Email") %>
                        </td>
                        <td>
                          <asp:Label ID="lbUserName" runat="server" Text='<%#Eval("UserName")%>' Visible="false"></asp:Label>
                          <asp:Literal ID="ltrRole" runat="server"></asp:Literal>
                        </td> 
                        <td>
                            
                                <asp:LinkButton ID="lbtOther" CommandName="PhanQuyenOther" CommandArgument='<%#Eval("UserName")%>' runat="server">Create menu for user</asp:LinkButton>    
                                  
                        </td> 
                        <td>
                            <asp:Image ID="ImaStatus" runat="server" Width="16px" Height="16px" />
                        </td>                      
                    </tr>
        </ItemTemplate>
        <FooterTemplate>
                </tbody>
             </table>
        </FooterTemplate>
    </asp:Repeater>
        </asp:Panel>

        <asp:Panel ID="pnUserOther" runat="server">
            <asp:Repeater ID="rpUserOther" runat="server" onitemcommand="rpUserOther_ItemCommand" 
            onitemdatabound="rpUserOther_ItemDataBound" >                      
        <HeaderTemplate>
            <table ID="table" border="0" cellpadding="0" cellspacing="0" >
                 <thead>
                    <tr>
                                    <th>
                                        <asp:CheckBox ID="ckAll" runat="server" AutoPostBack="true" OnCheckedChanged="CheckAll" />                        
                                    
                                    <th>
                                        <asp:Label ID="lbID" runat="server" Text="Number Oder"></asp:Label>
                                    </th>
                                    <th>
                                        <asp:Label ID="lbAccount" runat="server" Text=" Account"></asp:Label>                            
                                    </th>
                                    <th>
                                        <asp:Label ID="lbEmail" runat="server" Text=" Email "></asp:Label>                             
                                    </th>
                                    <th>
                                        <asp:Label ID="lbRole" runat="server" Text=" Role "></asp:Label>                             
                                    </th> 
                                    <th>
                                        <asp:Label ID="lbMenuCon" runat="server" Text=" Create menu for user "></asp:Label>                             
                                    </th>   
                                    <th>
                                         <asp:Label ID="lbStatus" runat="server" Text=" Status "></asp:Label>   
                                    </th>                                                                                                                                             
                    </tr>
                 </thead>
                 <tbody>            
        </HeaderTemplate>
        <ItemTemplate>
                 <tr>
                        <td>
                            <asp:CheckBox ID="ckMenu"  runat="server" />
                            <asp:Label ID="lbDelID" runat="server" Visible="false" Text='<%#Eval("UserName")%>'></asp:Label>
                        </td>
                        <td>
                             <%# Container.ItemIndex + 1 %>
                        </td>
                        <td>
                           <a href='EHTUserUI.aspx?User=<%#Eval("UserName")%>' class="linkedit">
                             <%#Eval("UserName")%>
                           </a>
                        </td>
                        <td>
                            <%#Eval("Email") %>
                        </td>
                        <td>
                          <asp:Label ID="lbUserName" runat="server" Text='<%#Eval("UserName")%>' Visible="false"></asp:Label>
                          <asp:Literal ID="ltrRole" runat="server"></asp:Literal>
                        </td> 
                        <td>
                            
                                <asp:LinkButton ID="lbtOther" CommandName="PhanQuyenOther" CommandArgument='<%#Eval("UserName")%>' runat="server">Create menu for user</asp:LinkButton>    
                                 
                        </td> 
                        <td>
                            <asp:Image ID="ImaStatus" runat="server" Width="16px" Height="16px" />
                        </td>                      
                    </tr>
        </ItemTemplate>
        <FooterTemplate>
                </tbody>
             </table>
        </FooterTemplate>
    </asp:Repeater>
        </asp:Panel>
    </div>    
</asp:Content>
